home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
S-Sound and Music
/
(c)s2.d64
/
musicbox dncer.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
6KB
|
148 lines
100 REM PROGRAMMED BY BOB YEWCHUK MISSISSAUGA ONTARIO
120 REM AS OF JULY 10, 1983
140 REM MUSIC BOX DANCER--WRITTEN BY FRANK MILLS
160 REM COPYRIGHT 1974/1979 PETER PIPER MUSIC LTD. ALL RIGHTS RESERVED
200 POKE53280,11:POKE53281,11:PRINTCHR$(8):PRINTCHR$(14):PRINTCHR$(5)
220 PRINT"[147][211]PEED: 1=[198]ASTEST"
225 PRINT" 300=[211]LOWEST":INPUTT
230 IFT=0THENT=140
240 PRINT"[147][205]USIC [194]OX [196]ANCER"
260 PRINT"BY [198]RANK [205]ILLS"
280 GOSUB10000
290 REM INITIALIZE VARIABLES
300 A1=54277:A2=54284:A3=54291:REM ATTACK/DECAY
310 S1=54278:S2=54285:S3=54292:REM SUSTAIN/RELEASE
320 W1=54276:W2=54283:W3=54290:REM WAVWFORMS
330 H1=54273:H2=54280:H3=54287:REM HIGH BYTE OF NOTE
340 L1=54272:L2=54279:L3=54286:REM LOW BYTE OF NOTE
350 X1=54275:X2=54282:X3=54289:REM HIGH NYBBLE OF PULSE WIDTH
360 Y1=54274:Y2=54281:Y3=54288:REM LOW BYTE OF PULSE WIDTH
370 VC=54296:REM VOLUME CONTROL
400 REM START UP THE SYSTEM
410 POKEA1,74:POKEA2,74:POKEA3,74:POKES1,138:POKES2,168:POKES3,138
430 POKEW1,33:POKEW2,65:POKEW3,65
440 POKEX1,27:POKEX2,72:POKEX3,145:POKEY1,4:POKEY2,3:POKEY3,7
460 POKEVC,15
500 REM THE MAIN ROUTINE
510 FORG=1TO2
520 READA,B,C,D,E,F
530 IFG=2ANDA=0ANDC=0ANDE=0THEN880
540 IFA=999THEN620
560 POKEH1,A:POKEL1,B:POKEH2,C:POKEL2,D:POKEH3,E:POKEL3,F
580 FORW=1TOT:NEXT
600 GOTO520
620 RESTORE:NEXT
880 FORQ=1TO(8*T):NEXT
900 GOSUB10000:PRINTCHR$(9):END
990 REM DATA STARTS HERE
1010 DATA16,195,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0
1020 DATA33,135,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0:REM BAR 1
1030 DATA16,195,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0
1040 DATA33,135,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0:REM BAR 2
1050 DATA16,195,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0
1060 DATA33,135,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0:REM BAR 3
1070 DATA16,195,0,0,0,0,21,31,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0
1080 DATA33,135,0,0,0,0,25,30,0,0,0,0,21,31,0,0,0,0,25,30,33,135,0,0:REM BAR 4
1090 DATA 16,195,33,135,0,0,21,31,25,30,0,0
1100 DATA 25,30,33,135,0,0,33,135,42,62,0,0
1110 DATA 21,31,33,135,0,0,25,30,42,62,0,0
1120 DATA33,135,50,60,0,0,25,30,33,135,0,0:REM BAR 5
1130 DATA22,96,67,15,0,0,28,49,63,75,0,0
1140 DATA33,135,56,99,0,0,44,193,50,60,0,0
1150 DATA16,195,50,60,0,0,21,31,50,60,0,0
1160 DATA25,30,0,0,0,0,33,135,0,0,0,0:REM BAR 6
1170 DATA12,143,50,60,0,0,15,210,44,193,0,0
1180 DATA18,209,37,162,0,0,25,30,31,165,0,0
1190 DATA15,210,25,30,0,0,18,209,31,165,0,0
1200 DATA25,30,37,162,0,0,18,209,44,193,0,0:REM BAR 7
1210 DATA16,193,42,62,0,0,21,31,33,135,0,0
1220 DATA33,135,56,99,0,0,25,30,50,60,0,0
1230 DATA21,31,50,60,0,0,25,30,50,60,0,0
1240 DATA33,135,0,0,0,0,25,30,33,135,0,0:REM BAR 8
1250 DATA 16,195,33,135,0,0,21,31,25,30,0,0
1260 DATA 25,30,33,135,0,0,33,135,42,62,0,0
1270 DATA 21,31,33,135,0,0,25,30,42,62,0,0
1280 DATA33,135,50,60,0,0,25,30,33,135,0,0:REM BAR 9
1290 DATA22,96,67,15,0,0,28,49,63,75,0,0
1300 DATA33,135,56,99,0,0,44,193,50,60,0,0
1310 DATA16,195,50,60,0,0,21,31,50,60,0,0
1320 DATA25,30,0,0,0,0,33,135,0,0,0,0:REM BAR 10
1330 DATA12,143,50,60,0,0,15,210,44,193,0,0
1340 DATA18,209,37,162,0,0,25,30,31,165,0,0
1350 DATA15,210,25,30,0,0,18,209,31,165,0,0
1360 DATA25,30,37,162,0,0,18,209,31,165,0,0:REM BAR 11
1370 DATA16,195,33,135,0,0,21,31,25,30,0,0
1380 DATA25,30,42,62,0,0,33,135,33,135,0,0
1390 DATA21,31,33,135,0,0,25,30,33,135,0,0
1400 DATA33,135,0,0,0,0,12,143,33,135,0,0:REM BAR 12
1410 DATA0,0,33,135,4,48,12,143,25,30,4,48
1420 DATA16,195,33,135,4,48,21,31,42,62,4,48
1430 DATA12,143,33,135,4,48,12,143,42,62,4,48
1440 DATA16,195,50,60,4,48,8,97,33,135,4,48:REM PART 2 -- BAR 1
1460 DATA0,0,5,152,67,15,11,48,63,75,5,152
1470 DATA14,24,56,99,5,152,12,143,50,60,5,152
1480 DATA8,97,50,60,0,0,12,143,50,60,0,0
1490 DATA16,195,21,31,0,0,9,104,12,143,0,0:REM PART 2 -- BAR 2
1500 DATA0,0,100,121,6,71,12,143,89,131,6,71
1510 DATA18,209,75,69,6,71,22,96,63,75,6,71
1520 DATA12,143,50,60,6,71,12,143,63,75,6,71
1530 DATA22,96,75,69,6,71,12,143,89,131,6,71:REM PART 2 -- BAR 3
1540 DATA0,0,84,125,4,48,12,143,67,15,4,48
1550 DATA16,195,112,199,4,48,21,31,100,121,4,48
1560 DATA12,143,100,121,4,48,12,143,100,121,4,48
1570 DATA16,195,21,31,4,48,12,143,33,135,4,48:REM PART 2 -- BAR 4
1580 DATA0,0,33,135,4,48,12,143,25,30,4,48
1590 DATA16,195,33,135,4,48,21,31,42,62,4,48
1600 DATA12,143,33,135,4,48,12,143,42,62,4,48
1610 DATA16,195,50,60,4,48,8,97,33,135,4,48:REM PART 2 -- BAR 5
1620 DATA0,0,5,152,67,15,11,48,63,75,5,152
1630 DATA14,24,56,99,5,152,12,143,50,60,5,152
1640 DATA8,97,50,60,0,0,12,143,50,60,0,0
1650 DATA16,195,21,31,0,0,9,104,12,143,0,0:REM PART 2 -- BAR 6
1660 DATA0,0,100,121,6,71,12,143,89,131,6,71
1670 DATA18,209,75,69,6,71,22,96,63,75,6,71
1680 DATA12,143,50,60,6,71,12,143,63,75,6,71
1690 DATA22,96,75,69,6,71,12,143,63,75,6,71:REM PART 2 -- BAR 7
1700 DATA0,0,67,15,4,48,12,143,50,60,4,48
1710 DATA16,195,84,125,4,48,21,31,67,15,4,48
1720 DATA12,143,67,15,4,48,12,143,67,15,4,48
1730 DATA16,195,67,15,4,48,12,143,67,15,4,48:REM PART 2 -- BAR 8
1740 DATA89,131,134,30,5,152,11,48,112,199,5,152
1750 DATA16,195,89,131,5,152,22,96,67,15,5,152
1760 DATA11,48,56,99,5,152,11,48,67,15,5,152
1770 DATA14,24,89,131,5,152,12,143,112,199,5,152:REM PART 2 -- BAR 9
1780 DATA0,0,100,121,4,48,12,141,67,75,4,48
1790 DATA16,195,112,199,4,48,21,31,100,121,4,48
1800 DATA12,143,100,121,4,48,12,143,100,121,4,48
1810 DATA16,195,21,31,4,48,9,104,12,143,4,48:REM PART 2 -- BAR 10
1820 DATA63,75,100,121,6,71,12,143,89,131,6,71
1830 DATA18,209,75,69,6,71,22,96,63,75,6,71
1840 DATA12,143,50,60,6,71,15,210,63,75,6,71
1850 DATA18,209,75,69,6,71,12,143,89,131,6,71:REM PART 2 -- BAR 11
1860 DATA0,0,84,125,4,48,16,195,67,15,4,48
1870 DATA21,31,112,199,4,48,33,135,100,121,4,48
1880 DATA16,195,100,121,4,48,16,195,67,15,4,48
1890 DATA25,30,84,125,4,48,11,48,100,121,4,48:REM PART 2 -- BAR 12
1900 DATA89,131,134,30,5,152,11,48,112,199,5,152
1910 DATA16,195,89,131,5,152,22,96,67,15,5,152
1920 DATA11,48,56,99,5,152,11,48,67,15,5,152
1930 DATA14,24,89,131,5,152,12,143,112,199,5,152:REM PART 2 -- BAR 13
1940 DATA0,0,100,121,4,48,12,141,67,75,4,48
1950 DATA16,195,112,199,4,48,21,31,100,121,4,48
1960 DATA12,143,100,121,4,48,12,143,67,15,4,48
1970 DATA16,195,67,15,4,48,12,143,67,15,4,48:REM PART 2 -- BAR 14
1980 DATA63,75,100,121,6,71,12,143,89,131,6,71
1990 DATA18,209,75,69,6,71,22,96,63,75,6,71
2000 DATA12,143,50,60,6,71,15,210,63,75,6,71
2010 DATA18,209,75,69,6,71,12,143,63,75,6,71:REM PART 2 -- BAR 15
2020 DATA0,0,67,15,4,48,12,143,50,60,4,48
2030 DATA16,195,84,125,4,48,12,143,67,15,4,48.
2040 DATA16,195,67,15,4,48,16,195,67,15,4,48
2050 DATA0,0,0,0,0,0,0,0,0,0,0,0:REM PART 2 -- BAR 16
9970 DATA999,999,999,999,999,999
9980 GOSUB10000
9990 END
10000 REM CLEAR SOUND LOCATIONS
10020 FORQ=54270TO54300:POKEQ,0:NEXT
10040 RETURN